<extend name="./Application/Admin/View/Layout/application.html"/>

<block name="content">
    <div class="admin-content">
        <div class="admin-content-body">
            <div class="am-cf am-padding am-padding-bottom-0">
                <div class="am-fl am-cf"><strong class="am-text-primary am-text-lg">商品回收站</strong> /
                    <small>recycle bin</small>
                </div>
            </div>

            <hr>

            <div class="am-g">
                <div class="am-u-sm-12 am-u-md-6">
                    <div class="am-btn-toolbar">
                        <div class="am-btn-group am-btn-group-xs">
                            <a href="#" class="am-btn am-btn-primary"><span
                                    class="am-icon-plus"></span> 还原
                            </a>
                            <a href="#" class="am-btn am-btn-danger"><span class="am-icon-trash-o"></span> 删除
                            </a>
                        </div>
                    </div>
                </div>
            </div>

            <div class="am-g">
                <div class="am-u-sm-12">
                    <table class="am-table am-table-striped am-table-hover table-main">
                        <thead>
                        <tr>
                            <th class="table-check"><input type="checkbox"/></th>
                            <th class="table-id">ID</th>
                            <th class="table-title">商品名称</th>
                            <th class="table-date am-hide-sm-only">缩略图</th>
                            <th class="table-type">所属分类</th>
                            <th class="table-author am-hide-sm-only">单价</th>
                            <th class="table-date am-hide-sm-only">库存</th>
                            <th class="table-date am-hide-sm-only">操作</th>
                        </tr>
                        </thead>
                        <tbody>
                        <volist name="products" id="product">
                            <tr>
                                <td><input type="checkbox"/></td>
                                <td class="am-hide-sm-only">{{$product.id}}</td>
                                <td class="am-hide-sm-only">{{$product.name}}</td>
                                <td class="am-hide-sm-only">
                                    <img src="{{$product.thumb}}" style="width:80px;height:60px;">
                                </td>
                                <td class="am-hide-sm-only"><a href="#">{{$product.category.name}}</a></td>
                                <td class="am-hide-sm-only">
                                    <input type="text" value="{{$product.price}}" style="width: 40px;">
                                </td>
                                <td class="am-hide-sm-only">
                                    <input type="text" value="{{$product.stock}}" style="width: 40px;">
                                </td>
                                <td>
                                    <div class="am-btn-toolbar">
                                        <div class="am-btn-group am-btn-group-xs">
                                            <a href="{{:U('recyble', ['id'=>$product[id]])}}"
                                               class="am-btn am-btn-default am-btn-xs am-text-secondary"><span
                                                    class="am-icon-pencil-square-o"></span> 还原
                                            </a>
                                            <a href="{{:U('delete_confirm',array('id'=>$product['id']))}}" class="am-btn am-btn-default am-btn-xs am-text-danger am-hide-sm-only">
                                                <span class="am-icon-trash-o"></span> 删除
                                            </a>
                                        </div>
                                    </div>
                                </td>
                            </tr>
                        </volist>


                        </tbody>
                    </table>
                    <div class="am-cf">
                        共 {{$count}} 条记录
                        <div class="am-fr">
                            <ul class="am-pagination">
                                {{$page}}
                            </ul>
                        </div>
                    </div>
                    <hr/>
                </div>

            </div>
        </div>

        <footer class="admin-content-footer">
            <hr>
            <p class="am-padding-left">© 2014 AllMobilize, Inc. Licensed under MIT license.</p>
        </footer>

    </div>
</block>
